
public class e010 {
    public static void main(String[] args) {
	long sTime = System.currentTimeMillis();
        long sum = 0;
        for(int i = 2; i < 2000000; i++) {
            if(isPrime(i)){
                sum += i;
            }
        }
        System.out.println(sum);
        long fTime = System.currentTimeMillis();
        System.out.println("Time: " + (fTime - sTime) + "ms");
    }

    public static boolean isPrime(int i) {
        for(int j = 2; j <= Math.sqrt(i); j++) {
            if (i % j == 0) {
                return false;
            }
        }
        return true;
    }
}